<template>
  <van-nav-bar
    :title="title"
    left-text="返回"
    left-arrow
    @click-left="onclickLeft"
  />
</template>
  
  <script>
export default {
  props: {
    title: String,
  },

  methods: {
    // 左边绑定的点击事件
    onclickLeft() {
      // this.$emit('onclickLeft');
      this.$router.go(-1);
    },
  },
};
</script>
  
  <style scoped lang="scss">
.van-nav-bar {
  position: sticky;
  top: 0;
}
</style>